package com.yw.accountInfo.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.time.LocalDateTime;

//@Schema(description = "账户信息VO")
@Data
public class AccountInfoVO {
    @Schema(description = "用户ID")
    private Integer id;
    @Schema(description = "账号")
    private String account;
    @Schema(description = "用户姓名")
    @NotBlank(message = "姓名不能为空")
    @Size(max = 10, message = "姓名最长10个字符")
    private String accName;
    @Schema(description = "手机号")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确", groups = {Add.class})
    @NotBlank(message = "手机号不能为空", groups = {Add.class})
    private String accPhone;
    @Schema(description = "用户密码")
    private Integer isEnable;
    @Schema(description = "创建时间")
    private LocalDateTime createTime;
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    public interface Add {}
    public interface Update {}
}
